import time
now_time = time.strftime('%H:%M:%S', time.localtime(time.time()))
import datetime
a, b, c, d, e, f = 0, '', '', '', '', '8:30'
times = [8, 30]
nows = [int(datetime.datetime.strftime(datetime.datetime.now(), '%H')),int(datetime.datetime.strftime(datetime.datetime.now(), '%M'))]
for i in range(0, 100):
    if nows[0] < times[0] or (nows[0] == times[0] and nows[1] <= times[1]):
        d = times[1] - nows[1]
        if d < 0:
            d = 60 + d
        break
    if i % 2 == 0:
        a += 1
    if i % 2 == 0:
        b, c = '上课', '这节课下课'
        times[1] += 45
        if times[0] == 20:
            times[1] -= 5
    else:
        b, c = '下课', '下节课上课'
        if times[0] == 12:
            times[1] += 100

        if times[0] == 17:
            times[1] += 60
        times[1] += 10

    while True:
        if times[1] >= 60:
            times[0] += 1
            times[1] -= 60
        else:
            break
    e = f
    if len(str(times[1])) < 2:
        f = str(times[0]) + ':0' + str(times[1])
    else:
        f = str(times[0]) + ':' + str(times[1])
print('【第' + str(a) + '节课' + b + '】距离' + c + '还有' + str(d) + '分钟')
print('当前时间  ' + now_time)
print(e + '----' + f)














